//
//  SearchCityCollectionReusableView.swift
//  LeTu
//
//  Created byg1 on 2024/1/15.
//

import UIKit

class SearchCityCollectionReusableView: UICollectionReusableView {
        
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        configUI()
    }
    func setCityModel(_ cityModel: CityModel) {
        cityLabel.text = LanguageManager.shared.currentLanguage == .zh ? cityModel.name:cityModel.englishName
    }
    
    // MARK: - configUI
    func configUI() {
        
        backgroundColor = UIColor.hex(hexString: "F8F8F8")
        
        addSubview(cityLabel)
        cityLabel.snp.makeConstraints { make in
            make.left.equalTo(20)
            make.centerY.equalToSuperview()
        }
        
    }
    private lazy var cityLabel: UILabel = {
        let cityLabel = UILabel()
        cityLabel.textColor = UIColor.hex(hexString: "868D9A")
        cityLabel.font = kSetPingFangMedium(12)
        return cityLabel
    }()
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
